//src/auth/dto/login.dto.ts
import { ApiProperty } from '@nestjs/swagger';
import { IsMobilePhone, IsNotEmpty, IsString, MinLength } from 'class-validator';

export class LoginDto {
  @IsMobilePhone('zh-CN', { strictMode: false }, { message: '手机号码格式不正确' })
  @IsNotEmpty()
  @ApiProperty()
  phone: string;

  @IsString()
  @IsNotEmpty()
  @MinLength(6)
  @ApiProperty()
  password: string;
}